<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>键盘事件</title>
	<style>



	</style>
</head>
<body>
	<ul id="menu">
		<li>首页</li>
		<li>刷新</li>
		<li>大象</li>
		<li>装冰箱</li>
		<li>开门</li>
		<li>放进去</li>
		<li>关门</li>
	</ul>
</body>
</html>
<script>

/*//组合键onkeydown
document.onkeydown = function(e){
	var e = e||event;
	if (e.ctrlKey&&e.keyCode==13){
		alert(1)
	}
}

//组合键onkeypress
document.onkeypress = function(e){
	var e = e||event;
	if (e.ctrlKey&&e.keyCode==13){
		alert(1)
	}
}
*/
//自定义菜单

//关闭浏览器默认右键菜单
function prevent(e){
	e.preventDefault?e.preventDefault():e.returnValue = false;
}


document.getElementById(menu)
document.oncontextmenu = function(e){
	var e = e||event;
	prevent(e);




};






</script>